package models

import "gorm.io/gorm"

type User struct { //用户表
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(200)"`
	Sex      string `gorm:"type:varchar(50)"`
	Email    string `gorm:"type:varchar(50)"`
}

type Role struct { //角色表
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
	RoleNo   string `gorm:"type:varchar(50)"`
}

type Node struct { //权限表
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type UserRole struct { //用户角色
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct { //角色权限
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}
